public class My {

    public static void main(String[] args) throws Exception {
//        int a[]={8,30,43,52,59,80,83,100};
//        Search my=new Search();
//        System.out.print(my.find(a,83));
//        System.out.println(my.find(a,36));
//
//        Student s1=new Student("001","张三","男","1班","139001");
//        Student s2=new Student("002","张4","男","2班","139002");
//        Student s3=new Student("003","张5","男","3班","139003");
//        Node root=new Node(s1);
//
//        my.insertBST(root, s1);
//        my.insertBST(root, s2);
//        my.insertBST(root, s3);
//
//        root.value.display();
//        //  root.lchild.value.display();
//        root.rchild.value.display();
//        root.rchild.rchild.value.display();
        int[] a={19,1,23,14,55,68,11,82,36};
        HashTable hashTable = new HashTable(11);
        hashTable.insert(a);
        hashTable.print();

    }
}
class Student
{
    public String id;
    public String name;
    public String sex;
    public String myClass;
    public String tel;
    public Student(String id,String name,String sex,String myClass,String tel)
    {
        this.id=id;
        this.name=name;
        this.sex=sex;
        this.myClass=myClass;
        this.tel=tel;
    }

    public void display()
    {
        System.out.println(id+"\t"+name+"\t"+sex+"\t"+myClass+"\t"+tel);
    }
}
class Node
{
    public Student value;
    public Node lchild;
    public Node rchild;

    public Node(Student v)
    {
        value=v;
        lchild=rchild=null;
    }
}

class Search
{
    public boolean insertBST(Node root,Student s)
    {
        if(root==null)
            return false;

        int data=Integer.parseInt(root.value.id);
        int x=Integer.parseInt(s.id);

        if(x==data)
        {
            return false;
        }

        if(x<data)
        {
            if(root.lchild==null)
            {
                root.lchild=new Node(s);
                return true;
            }
            else
                return insertBST(root.lchild,s);
        }
        else
        {
            if(root.rchild==null)
            {
                root.rchild=new Node(s);
                return true;
            }
            else
                return insertBST(root.rchild,s);
        }

    }

    public  int find(int a[],int x)
    {
        int n=a.length+1;
        int b[]=new int[n];
        b[0]=x;
        int i=1;
        for(;i<b.length;++i)
            b[i]=a[i-1];
        i=1;
        for(;i<b.length;++i)
        {
            if(b[0]==b[i])
                return i;
        }
        return -1;
    }
}